-- GENERATED SPELL FOR [Jademir Tree Warder] --


function spell0_5319(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(20654,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5319', 15000, 1)
end

function spell1_5319(pUnit, Event) --@Faerie Fire,n/a--
pUnit:FullCastSpellOnTarget(20656,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5319', 2000, 1)
end

function Sorts_5319(pUnit, Event)
local choix_sorts_5319 = math.random(0, 1)
if choix_sorts_5319 == 0 then
pUnit:RegisterEvent('spell0_5319', 1, 1)
end
if choix_sorts_5319 == 1 then
pUnit:RegisterEvent('spell1_5319', 1, 1)
end
end

function mob5319_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5319', math.random(1500, 3000), 1)
end

function mob5319_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5319_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5319_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5319, 1, 'mob5319_Action')
RegisterUnitEvent(5319, 2, 'mob5319_Leave')
RegisterUnitEvent(5319, 3, 'mob5319_Kill')
RegisterUnitEvent(5319, 4, 'mob5319_Die')
